#pragma once

using namespace System;

#ifdef _MANAGED
	#define REFNEW gcnew
	#define PLATFORM System
#else
	#define REFNEW ref new
	#define PLATFORM Platform
#endif


namespace Cephei
{
	public ref class CastException  sealed : System::Exception
	{
	public:
		CastException (String^ s) : Exception (s) {}
	};
/*
	public ref class Assert
	{
	public:
		generic <typename T> where T : ref class
		static void NotNull (T t, String^ m)
		{
			if (t == nullptr)
				throw REFNEW CastException (m);
		}
	};
	*/
	public ref class NativeNullException : System::Exception
	{
	public:
		NativeNullException () : Exception () {}
	};

	generic <typename MT>
	public interface class IUnobservable
	{
        void Unsubscribe (IObserver<MT>^ observer);
	};
}

